home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / misc-part2 / 11660 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: news00.btx.dtag.de!not-for-mail
  2. From: Kai.Kohlmorgen@t-online.de (Kai Kohlmorgen)
  3. Newsgroups: comp.sys.amiga.misc
  4. Subject: Re: Amigados - checking for a file
  5. Date: 8 Apr 1996 00:29:06 GMT
  6. Organization: Telekom Online Internet Gateway
  7. Message-ID: <4k9mki$3v5@news00.btx.dtag.de>
  8. References: <19960407.7BDE4A0.2128@asd10-12.dial.xs4all.nl>
  9. Mime-Version: 1.0
  10. Content-Type: text/plain; charset=iso-8859-1
  11. Content-Transfer-Encoding: 8bit
  12. X-Sender: 050528713-0001@t-online.de (Kai Kohlmorgen)
  13. X-Newsreader: THOR 2.2 (Amiga;TCP/IP) *UNREGISTERED*
  14.  
  15.  
  16. >In article <401.6670T240T431@nibelung.demon.co.uk> barry.1@nibelung.demon.co.uk
  17. >(Barry Shilliday) writes:
  18. >> What would be the format to check the existence of a file in a script for
  19. >> dos? I would have thought something like this:
  20. >>
  21. >> If EXISTS blah:filename
  22. >>   dowhatever
  23. >>   else
  24. >>    dothatinstead
  25. >>    endif
  26. >> endif
  27. >>
  28. >> but this doesn't work.
  29.  
  30. >You are using the correct syntax for the If statement, but there's one "endif"
  31. >too many.
  32.  
  33. To avoid annoying requesters try the following:
  34.  
  35.     Assign >NIL: blah:filename EXISTS
  36.     if warn
  37.         do this
  38.     else
  39.         do that
  40.     endif
  41.  
  42.  
  43. Bye,
  44.         Kai
  45.  
  46.     NICK: SEL
  47.         Email: Kai.Kohlmorgen@t-online.de
  48.                           kai@sel.heide.de
  49.  
  50.  
  51.